import request from "@/utils/request"

export enum AdvInfoType {
  电站 = 1,
  优惠券 = 2,
  无 = 3,
}

export enum AdvShow {
  展示 = 1,
  隐藏 = 2,
}

export enum AdvOpenType {
  轮播图 = 1,
  弹窗 =2,
}

export enum AdvPlaceType {
  小程序首页 = 1,
  商城板块首页 =2,
}

export interface QueryAdvListParams extends PaginationParams {
  openType?: AdvOpenType
  placeType?: AdvPlaceType
  infoType?: AdvInfoType
  isShow?: AdvShow
}

export interface Adv {
  userId: number
  /** 关联信息名称 */
  reason: string
  money: number
  other: string
}

export async function editAdv(params: Partial<Adv>) {
  return request('/app/manager/balance/refund/hand/finish', {
    data: params,
  })
}

